<?php
# OALib目录
define('SDK_OA_LIB', '/opt/op/OALib/');
# OA SDK OALib
define('SDK_OA_SDK', '/opt/op/sdk/');
# APP ROOT
define('SDK_APP_ROOT', dirname(dirname(__FILE__)) . OS_PATH_SEP);
if (!defined('__OA_ENV')) {
    $hostname = php_uname('n');
    $devHostnames = array('oa-dev', 'localhost.localdomain');
    $testHostnames = array('C113479', 'C113464', 'C113480', 'fefe');
    $sandboxHostnames = array('oa-sandbox');
    if (in_array($hostname, $devHostnames)) {
        define('__OA_ENV', 'DEV');
    } else if (in_array($hostname, $testHostnames)) {
        define('__OA_ENV', 'TEST');
    } else if (in_array($hostname, $sandboxHostnames)) {
        define('__OA_ENV', 'SANDBOX');  
    } else {
        define('__OA_ENV', 'ONLINE');
    }
}
# 环境
if (!defined('__OA_ENV') || __OA_ENV != 'ONLINE'){
    define('SDK_ENV', 'webserver.');//测试环境
    # Log  Success?
    define('LOG_SUCCESS', TRUE);
} else {
    define('SDK_ENV', 'webonline.');//线上环境  
    # Log  Success?
    define('LOG_SUCCESS', FALSE);
}
# Config Path
define('SDK_CONFIGS_PATH', dirname(__FILE__) . OS_PATH_SEP);
# Log  Switches
define('SDK_LOG_INFO', TRUE);
# default_socket_timeout
ini_set('default_socket_timeout', 120);
